﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package {
    import com.views.interfaces.IMiniMap;
    import com.views.interfaces.ITip;
    
    import flash.display.*;
    import flash.events.*;
    import flash.text.*;

    public class MCMiniMap extends Sprite implements IMiniMap {

        public var _MapName:TextField;//instance name
        public var _Setting:SimpleButton;//instance name
        public var _World:SimpleButton;//instance name
        public var _GameHelp:SimpleButton;//instance name
        public var _SoundMute:SimpleButton;//instance name
        public var _Hide:SimpleButton;//instance name
        public var _Show:SimpleButton;//instance name
        public var _SoundOpen:SimpleButton;//instance name
        private var _onSubline:Function;
        private var _onWorld:Function;
        private var _onSetting:Function;
        private var _onShow:Function;
        private var _onHide:Function;
        private var _onGameHelp:Function;
        private var _tip:ITip;

        public function MCMiniMap(){
            this._onSubline = (this._onWorld = (this._onSetting = (this._onShow = (this._onHide = new Function()))));
            this._World.addEventListener(MouseEvent.CLICK, this.onWorldClick);
            this._Setting.addEventListener(MouseEvent.CLICK, this.onSettingClick);
            this._Show.addEventListener(MouseEvent.CLICK, this.onShowClick);
            this._Hide.addEventListener(MouseEvent.CLICK, this.onHideClick);
            this._GameHelp.addEventListener(MouseEvent.CLICK, this.onGameHelpClick);
        }
        private function setTips(_arg1:DisplayObject, _arg2:String):void{
            if (this._tip){
                this._tip.addTarget(_arg1, _arg2);
            };
        }
        private function onShowClick(_arg1:Event):void{
            this._onShow();
            this._Show.visible = false;
            this._Hide.visible = true;
        }
        private function onHideClick(_arg1:Event):void{
            this._onHide();
            this._Hide.visible = false;
            this._Show.visible = true;
        }
        private function onWorldClick(_arg1:Event):void{
            this._onWorld();
        }
        private function onSettingClick(_arg1:Event):void{
            this._onSetting();
        }
        private function onGameHelpClick(_arg1:Event):void{
            this._onGameHelp();
        }
        public function get content():Sprite{
            return (this);
        }
        public function set mapName(_arg1:String):void{
            this._MapName.htmlText = (("<b>" + _arg1) + "</b>");
        }
        public function get mapName():String{
            return (this._MapName.text);
        }
        public function set worldVisible(_arg1:Boolean):void{
            this._World.visible = _arg1;
        }
        public function set settingVisible(_arg1:Boolean):void{
            this._Setting.visible = _arg1;
        }
        public function set gameHelpVisible(_arg1:Boolean):void{
            this._GameHelp.visible = _arg1;
        }
        public function set showVisible(_arg1:Boolean):void{
            this._Show.visible = _arg1;
        }
        public function set hideVisible(_arg1:Boolean):void{
            this._Hide.visible = _arg1;
        }
        public function set onWorld(_arg1:Function):void{
            this._onWorld = _arg1;
        }
        public function set onSetting(_arg1:Function):void{
            this._onSetting = _arg1;
        }
        public function set onShow(_arg1:Function):void{
            this._onShow = _arg1;
        }
        public function set onHide(_arg1:Function):void{
            this._onHide = _arg1;
        }
        public function set onGameHelp(_arg1:Function):void{
            this._onGameHelp = _arg1;
        }
        public function set tip(_arg1:ITip):void{
            this._tip = _arg1;
        }

    }
}//package 
